<div class="breadcrumbs breadcrumbs-fixed ace-save-state">
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-users home-icon"></i>
            <a href="#">种植管理</a>
        </li>
        <li class="active">收购果实订单列表</li>
    </ul>
</div>


<div class="page-content">
    <div class="row">
        <div class="col-xs-12">
            <h4 class="header smaller lighter blue">收购果实订单列表</h4>
            <div class="row">
                <div class="col-sm-3">
                </div>
                <div class="col-sm-9">
                    <form id="searchForm" class="form-inline text-right" role="search">
                        <div class="input-group">
                            <input id="nameOrMobile" name="nameOrMobile" class="form-control input-sm" type="text"
                                   placeholder="用户名称"/>
                            <span class="input-group-btn">
                                <button id="searchBtn" class="btn btn-xs btn-info" type="button">
                                    <i class="ace-icon fa fa-search"></i> 搜索
                                </button>
					        </span>
                        </div>
                    </form>
                </div>
            </div>
            <div class="space-6"></div>
            <div class="dataTables_wrapper form-inline no-footer">
                <table id="company-table" class="table table-striped table-bordered table-hover">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>用户昵称</th>
                        <th>单价</th>
                        <th>重量</th>
                        <th>金额</th>
                        <th>收购时间</th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>


    <script type="text/javascript">
        $(function () {
            company_table = $('#company-table').DataTable({
                language: {url: 'ace/json/dataTable_CN.json'},
                autoWidth: false,
                ordering: false,
                searching: false,
                serverSide: true,
                processing: true,
                deferRender: true,
                responsive: true,
                ajax: {
                    url: 'management/recycleFruitOrder'
                },
                columns: [
                    {
                        data: 'id',
                        defaultContent: ''
                    },
                    {
                        data: 'name',
                        defaultContent: ''
                    }, {
                        data: 'price',
                        defaultContent: ''
                    }, {
                        data: 'weight',
                        defaultContent: ''
                    },{
                        data: 'allPrice',
                        defaultContent: ''
                    }, {
                        data: 'createTime',
                        defaultContent: ''
                    }
                ]
            });

            $('#searchBtn').click(function () {
                var param = $("#searchForm").serialize();
                company_table.ajax.url("management/recycleFruitOrder?" + param).load();
            });

            $('#company-table').find('> thead > tr > th input[type=checkbox]').eq(0).on('click', function () {
                $('#company-table').find('tbody > tr').find('input:checkbox').prop("checked", this.checked);
            });



        });
    </script>
</div>